Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception are now always caught, remove compile time check #345

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

krocard
Copy link
Contributor

@krocard krocard commented Dec 5, 2023

Problem (PRN-92)

RejectPromiseOnExceptionBlock was introduced as a compile time way of throwing with a guaranty that the exception would be caught and the promise rejected.

Now that all the code has been migrated to the safer run*AndRejectOnException, the complexity of RejectPromiseOnExceptionBlock is no longer warrantied.

Changes

Remove RejectPromiseOnExceptionBlock, which allows some simplification as it was shadowing the receiver in some cases.

📚 Other PRs for this issue

@krocard krocard self-assigned this Dec 5, 2023
@krocard krocard closed this Dec 5, 2023
@krocard krocard reopened this Dec 6, 2023
@krocard krocard changed the title refactor: throw on invalid RN input Exception are now always caught, remove compile time check Dec 6, 2023
@krocard krocard marked this pull request as ready for review December 6, 2023 14:28
Base automatically changed from PRN-74/refactor--improve-null-safety to development December 7, 2023 08:36
Copy link
Contributor

@zigavehovec zigavehovec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

Co-authored-by: Žiga Vehovec <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants